/**
 * Populates a given select element with
 * companies
 */
function populateCompanies(response, element)
{
    // eval json to javascript
    companies = eval(response.responseText);
    
    $(element).options.length = 0;

    for(i=0; i < companies.length; i++) {
        $(element).options[i] = new Option(companies[i].name, companies[i].id);
    }
}
